<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateLatestStateTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_firstName}" for="firstName" />
                    <h:inputText id="firstName" value="#{latestStateController.selected.firstName}" title="#{bundle.CreateLatestStateTitle_firstName}" required="true" requiredMessage="#{bundle.CreateLatestStateRequiredMessage_firstName}"/>
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_lastName}" for="lastName" />
                    <h:inputText id="lastName" value="#{latestStateController.selected.lastName}" title="#{bundle.CreateLatestStateTitle_lastName}" required="true" requiredMessage="#{bundle.CreateLatestStateRequiredMessage_lastName}"/>
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_room}" for="room" />
                    <h:inputText id="room" value="#{latestStateController.selected.room}" title="#{bundle.CreateLatestStateTitle_room}" />
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_updateDate}" for="updateDate" />
                    <h:inputText id="updateDate" value="#{latestStateController.selected.updateDate}" title="#{bundle.CreateLatestStateTitle_updateDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_oxigenLevel}" for="oxigenLevel" />
                    <h:inputText id="oxigenLevel" value="#{latestStateController.selected.oxigenLevel}" title="#{bundle.CreateLatestStateTitle_oxigenLevel}" />
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_heartRate}" for="heartRate" />
                    <h:inputText id="heartRate" value="#{latestStateController.selected.heartRate}" title="#{bundle.CreateLatestStateTitle_heartRate}" />
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_bloodPresure}" for="bloodPresure" />
                    <h:inputText id="bloodPresure" value="#{latestStateController.selected.bloodPresure}" title="#{bundle.CreateLatestStateTitle_bloodPresure}" />
                    <h:outputLabel value="#{bundle.CreateLatestStateLabel_id}" for="id" />
                    <h:inputText id="id" value="#{latestStateController.selected.id}" title="#{bundle.CreateLatestStateTitle_id}" required="true" requiredMessage="#{bundle.CreateLatestStateRequiredMessage_id}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{latestStateController.create}" value="#{bundle.CreateLatestStateSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{latestStateController.prepareList}" value="#{bundle.CreateLatestStateShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateLatestStateIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
